<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title></title>
    <script type="text/javascript">
        var i = prompt('请输入');
        for (var j = 0; j < i; j++) {
            for (var k = 0; k < i - j; k++) {
                document.write("*")
            }
            document.write("<br/>")
        }
    </script>
</head>

<body>
</body>

</html>